package Resp

import (
	"io/ioutil"
	"log"
	"net/http"
)

type Args struct {
	Url string
}

type Method struct {
}

type Result struct {
	Re string
}

func (this *Method) Resp(args Args, result *Result) error {
	url := args.Url
	resp, err := http.Get(url)
	if err != nil {
		log.Fatal(err)
		return err
	}
	defer resp.Body.Close()
	b, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
		return err
	}
	log.Println(string(b))
	result.Re = string(b)
	return nil
}
